import myAxios from "@/request";
import type {
  SystemNotification,
  SystemNotificationQueryRequest,
  SystemNotificationAddRequest,
  SystemNotificationUpdateRequest,
  DeleteRequest,
} from "../models/systemNotification";

/**
 * 分页获取系统通知列表
 */
export const listSystemNotificationByPage = async (
  params: SystemNotificationQueryRequest
) => {
  return myAxios.post("/api/systemNotification/list/page", params);
};

/**
 * 添加系统通知
 */
export const addSystemNotification = async (
  params: SystemNotificationAddRequest
) => {
  return myAxios.post("/api/systemNotification/add", params);
};

/**
 * 更新系统通知
 */
export const updateSystemNotification = async (
  params: SystemNotificationUpdateRequest
) => {
  return myAxios.post("/api/systemNotification/update", params);
};

/**
 * 删除系统通知
 */
export const deleteSystemNotification = async (params: DeleteRequest) => {
  return myAxios.post("/api/systemNotification/delete", params);
};
